package com.mrjoew.weekend.entities.po.shop;

import com.mrjoew.weekend.entities.BasePO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.SQLDelete;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;

/**
 * @author Christopher Jones
 * @ClassName GoodsPO
 * @explain
 * @date 2020/11/5 0005 19:49
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@SQLDelete(sql = "UPDATE `shop_goods` SET deleted = 1 WHERE id = ?")
@Entity
@Table(name = "shop_goods")
public class GoodsPO extends BasePO {

    /**
     * 品牌
     */
    private String brand;

    /**
     * 商品分类
     */
    private String type;

    /**
     * CPU
     */
    private String cpu;

    /**
     * 系统
     */
    private String system;

    /**
     * 屏幕
     */
    private String screen;

    /**
     * 价钱
     */
    private BigDecimal price;

    /**
     * 是否优惠
     */
    private Integer discounts;

    /**
     * 优惠价格
     */
    private BigDecimal discountsPrice;

    /**
     * 主展示图
     */
    private String picture;
}
